package com.dj.mingkong.common.annotation;

import com.dj.mingkong.common.enums.RoleEnum;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;

import java.lang.annotation.*;

/**
 * 角色访问控制
 *
 * @author zenglonghui
 * @date: 2023/6/14 15:21
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD})
@Inherited
@Documented
@Order(Ordered.HIGHEST_PRECEDENCE) //最高优先级
public @interface HasRoles {
    RoleEnum[] value() default {};
}
